![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
pathe
Advanced tools
Changelog
Readme
Universal filesystem path utils
❓ Why
For historical reasons, windows followed MS-DOS and using backslash for separating paths rather than slash used for macOS, Linux, and other Posix operating systems. Nowadays, Windows supports both Slash and Backslash for paths. Node.js's built in
path
module in the default operation of the path module varies based on the operating system on which a Node.js application is running. Specifically, when running on a Windows operating system, the path module will assume that Windows-style paths are being used. This makes inconsistent code behavior between Windows and POSIX. Compared to popular upath, pathe is providing identical exports of Node.js with normalization on all operations and written in modern ESM/Typescript and has no dependency on Node.js!
This package is a drop-in replacement of the Node.js's path module module and ensures paths are normalized with slash /
and work in environments including Node.js.
Install using npm or yarn:
# npm
npm i pathe
# yarn
yarn add pathe
# pnpm
pnpm i pathe
Import:
// ESM / Typescript
import { resolve } from 'pathe'
// CommonJS
const { resolve } = require('pathe')
Read more about path utils from Node.js documentation and rest assured behavior is ALWAYS like POSIX regardless of your input paths format and running platform!
Pathe exports some extra utilities that do not exist in standard Node.js path module.
In order to use them, you can import from pathe/utils
subpath:
import { filename, normalizeAliases, resolveAlias } from 'pathe/utils'
MIT. Made with 💖
Some code used form Node.js project. See LICENSE.
FAQs
Universal filesystem path utils
The npm package pathe receives a total of 9,130,129 weekly downloads. As such, pathe popularity was classified as popular.
We found that pathe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.